import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.12

Page {
	property var basic_button_diameter: (function_panel_grid.width / 4)
	Rectangle {
		id: background_rect
		z: -99
		anchors.fill: parent
		color: "#F0F0F0"
	}
	ColumnLayout {
		anchors.fill: parent
		Rectangle {
			id: brief_information_rect
			z: 10
			Layout.fillWidth: true
			Layout.fillHeight: true
			Layout.margins: 5
			color: "#ffffff"
			radius: 20
			StackView {
				id: home_stackview
				z: 10
				initialItem: "RealTimeDataStackView.qml"
				anchors.fill: parent
				anchors.margins: 5
				objectName: "RealTimeDataStackView.qml"
			}
		}
		Rectangle {
			id: function_panel_rect
			z: 10
			Layout.fillWidth: true
			Layout.minimumHeight: width / 3 * 2
			Layout.margins: 5
			color: "#ffffff"
			radius: 20
			GridLayout {
				z: 11
				id: function_panel_grid
				anchors.fill: parent
				columns: 3
				RoundButton {
					id: remote_detail_roundbutton
					Layout.preferredWidth: basic_button_diameter
					Layout.preferredHeight: basic_button_diameter
					Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
					font.family: defaultFontFamily
					font.bold: true
					font.capitalization: Font.MixedCase
					highlighted: true
					display: AbstractButton.TextUnderIcon
					text: qsTr("远程信息")
					icon.height: basic_button_diameter / 2
					icon.width: basic_button_diameter / 2
					icon.source: "./Images/drawable/perm_device_information-black-24dp.svg"
				}
				RoundButton {
					id: running_mode_roundbutton
					Layout.preferredWidth: basic_button_diameter
					Layout.preferredHeight: basic_button_diameter
					Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
					font.family: defaultFontFamily
					font.bold: true
					font.capitalization: Font.MixedCase
					highlighted: true
					display: AbstractButton.TextUnderIcon
					text: qsTr("运行模式")
					icon.height: basic_button_diameter / 2
					icon.width: basic_button_diameter / 2
					icon.source: "./Images/drawable/av_timer-black-24dp.svg"
				}
				RoundButton {
					id: personalize_roundbutton
					Layout.preferredWidth: basic_button_diameter
					Layout.preferredHeight: basic_button_diameter
					Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
					font.family: defaultFontFamily
					font.bold: true
					font.capitalization: Font.MixedCase
					highlighted: true
					display: AbstractButton.TextUnderIcon
					text: qsTr("个性化")
					icon.height: basic_button_diameter / 2
					icon.width: basic_button_diameter / 2
					icon.source: "./Images/drawable/palette-black-24dp.svg"
				}
				RoundButton {
					id: remote_control_roundbutton
					Layout.preferredWidth: basic_button_diameter
					Layout.preferredHeight: basic_button_diameter
					Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
					font.family: defaultFontFamily
					font.bold: true
					font.capitalization: Font.MixedCase
					highlighted: true
					display: AbstractButton.TextUnderIcon
					text: qsTr("远程控制")
					icon.height: basic_button_diameter / 2
					icon.width: basic_button_diameter / 2
					icon.source: "./Images/drawable/control_camera-black-24dp.svg"
					onClicked: {
						if (home_stackview.objectName != "RemoteControlStackView.qml") {
							home_stackview.replace("RemoteControlStackView.qml")
							home_stackview.objectName = "RemoteControlStackView.qml"
						}
					}
				}
				RoundButton {
					id: realtime_data_roundbutton
					Layout.preferredWidth: basic_button_diameter
					Layout.preferredHeight: basic_button_diameter
					Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
					font.family: defaultFontFamily
					font.bold: true
					font.capitalization: Font.MixedCase
					highlighted: true
					display: AbstractButton.TextUnderIcon
					text: qsTr("实时数据")
					icon.height: basic_button_diameter / 2
					icon.width: basic_button_diameter / 2
					icon.source: "./Images/drawable/timeline-black-24dp.svg"
					onClicked: {
						if (home_stackview.objectName != "RealTimeDataStackView.qml") {
							home_stackview.replace("RealTimeDataStackView.qml")
							home_stackview.objectName = "RealTimeDataStackView.qml"
						}
					}
				}
				RoundButton {
					id: more_functions_roundbutton
					Layout.preferredWidth: basic_button_diameter
					Layout.preferredHeight: basic_button_diameter
					Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
					font.family: defaultFontFamily
					font.bold: true
					font.capitalization: Font.MixedCase
					highlighted: true
					display: AbstractButton.TextUnderIcon
					text: qsTr("更多功能")
					icon.height: basic_button_diameter / 2
					icon.width: basic_button_diameter / 2
					icon.source: "./Images/drawable/more_horiz-black-24dp.svg"
				}
			}
		}
	}
}

/*##^##
Designer {
	D{i:0;autoSize:true;height:480;width:640}
}
##^##*/

